package com.example.dday11.service.impl;

import com.example.dday11.dao.UserDao;
import com.example.dday11.entity.User;
import com.example.dday11.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Linyh
 * @Description
 * @Date 2022/7/18 16:37
 **/

@Service
public class UserImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public List<User> selectAllUser() {
        return userDao.selectAllUser();
    }

    @Override
    public User selectUserId(int id) {
        return userDao.selectUserId(id);
    }

    @Override
    public int addUser(User user) {
        return userDao.addUser(user);
    }

    @Override
    public int updateUser(User user) {
        return userDao.updateUser(user);
    }

    @Override
    public int deleteUser(int id) {
        return userDao.deleteUser(id);
    }
}
